# 导包
import app
# 创建接口类
class REG_API:
#     初始化
    def __init__(self):
        self.get_img_url = app.LEQ_URL + "/common/public/verifycode1/0.2324452"
        self.get_dx_url = app.LEQ_URL + "/member/public/sendSms"
        self.get_reg_url = app.LEQ_URL + "/member/public/reg"
        self.get_login_url = app.LEQ_URL + "/member/public/login"
    # 获取图片验证码
    def get_img(self,session):
        return  session.get(self.get_img_url)
    # 获取短信验证码
    def post_DX(self,session,dx_data):
        return session.post(self.get_dx_url,data=dx_data)
    # 注册
    def  post_reg(self,session,reg_data):
        return session.post(self.get_reg_url,data=reg_data)
    # 登录
    def post_login(self,session,login_data):
        return session.post(self.get_login_url,data=login_data)